<?php $this->load->view('common/ck-bosspagehead'); ?>
<?php $this->load->view('common/ck-bossheader'); ?>
<!--Body top CRV PART STARTS HERE-->
<article id="content">
    <div class="pgwrapper">
    <!--Body top CRV PART Ends HERE-->
<div class="w960 bg1 p15 bx_shw">
<table width="100%" align="center" border="0" cellpadding="5" cellspacing="0">
	<tr>
		<td width="20%" style="border-right: 2px solid #e5e5e5;" valign="top">
			<?php $this->load->view('enterprises/leftnavCMS'); ?>
			</td>
		<td width="80%" style="padding:5px;" valign="top">
		
			<div class="mb10" style="text-align: left">
				<h1>&nbsp;&nbsp;Edit Permission</h1>
			</div>
			<form name="permForm" action="/updatePermissions" onsubmit="return validateForm()" method="POST">
				<table cellpadding="5" cellspacing="1" bgcolor="#FFFFFF" id="formTable" width="100%">
					<?php $this->load->view('enterprises/userPermissions');?>
				</table>
			</form>
			
		</td>
	</tr>
</table>
     </div>
     </div>
</article>
    <!--Body BTM CRV PART Ends HERE-->
    <div class="clr-both spacer-10">&nbsp;</div>
<?php $this->load->view('common/ck-bossfooter'); ?>

<script type="text/javascript">
function validateForm()
{
var chks = document.getElementsByName('permission[]');
var hasChecked = false;
for (var i = 0; i < chks.length; i++)
{
if (chks[i].checked)
{
hasChecked = true;
break;
}
}
if (!hasChecked)
{
alert("Please select at least one.");
chks[0].focus();
return false;
}
return true;
}
</script>